package univer.oko.gui;

import univer.oko.utilities.CDUtilities;

import javax.swing.*;
import java.awt.event.ActionListener;

/**
 * @author Eduard Dudar
 *         DATE: 24.03.2005
 *         Copyright 2005
 */
public class CDMenuItem extends JMenuItem {
    public CDMenuItem(String name) {
        this(name, null);
    }

    public CDMenuItem(String name, Icon icon) {
        this(name, icon, null);
    }

    public CDMenuItem(String name, Icon icon, ActionListener action) {
        this(name, icon, action, null);
    }

    public CDMenuItem(String name, Icon icon, final ActionListener action, KeyStroke accelerator) {
        super(name, icon);
        this.setAccelerator(accelerator);
        this.addActionListener(action);
        this.setFont(CDUtilities.SYSTEM_FONT);
    }
}
